//添加$.on $.trigger
(function(){
	var obj = document;
	$.on = function(type, cb){
		$(obj).on(type, cb);
	}
	$.trigger = function(type, data){
		$(obj).trigger(type, data);
	}
})();
//处理String
(function(){
	if (typeof String.prototype.startsWith != 'function') {
	  String.prototype.startsWith = function(s) {
		    return this.indexOf(s) === 0;
		};
	}

	if (typeof String.prototype.endsWith != 'function') {
	  String.prototype.endsWith = function (str){
	    return this.slice(-str.length) == str;
	  };
	}
})();

(function(){
	Array.prototype.contains = function (elem) {
		for (var i = 0; i < this.length; i++) {
			if (this[i] == elem) {
				return true;
			}
		}
		return false;
	}
})();


